<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>图片浏览功能</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        .borderBox {
            width: 300px;
            /* height:300px; */
            margin: 40px auto;
            box-sizing: border-box;
            /* padding: 4px; */
            /* border: 1px solid lightsteelblue; */
            box-shadow: 0 0 6px lightblue;
            border-radius: 6px;
            overflow: hidden;
        }
        .borderBox img {
            display: block;
            width: 300px;
            height: 150px;
            object-fit: cover;
            object-position: left top;
            transition: 1s;
            /* cursor: pointer; */
        }
        .borderBox:hover img {
            object-position: right bottom;
        }
    </style>
</head>
<body>
    <div class="borderBox">
        <img src="./images/test2.jpg" alt="">
    </div>
    
</body>
</html>